package com.bawei.lib_storage.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey


@Entity(tableName = "b_history")//tableName表名
data class HistoryEntity(
    @ColumnInfo//字段
    @PrimaryKey(autoGenerate = true) //主键自增
    val id:Long,
    @ColumnInfo
    val userId: String, // 添加用户ID字段
    @ColumnInfo
    val type:Int,
    @ColumnInfo
    val title:String,
    @ColumnInfo
    val primaryImg:String,
    @ColumnInfo
    val content:String,
    @ColumnInfo
    val authorImg:String,
    @ColumnInfo
    val authorName:String,
    @ColumnInfo
    val progress:Int, // 观看进度百分比
    @ColumnInfo
    val lastPosition:Long, // 新增字段，记录观看到的毫秒数
    @ColumnInfo
    val videoId: String, // 新增，视频唯一标识
    @ColumnInfo
    val videopath: String // 新增，视频播放地址
)